namespace FIREFLYX {
    /**
     * 基础image（.jpg .png .web） parse
     */
    export class BaseImageParse {
        public static parse(data: HTMLImageElement, filePath: string): Nullable<Texture2D> {
            let tex: Texture2D = new Texture2D();
            let flipY = true;
            let p = ResPathProcessorParameterMap.get(filePath);
            if (p) {
                flipY = (p as any).flipY ? true : false;
            }
            //纹理储存设置
            tex.paramSetting.flipY = flipY;
            tex.setTextureData(data);
            //参数设置
            //应用参数
            tex.apply();
            return tex;
        }
    }
}